//
//  OAuthViewController.swift
//  ZSYWeiBo
//
//  Created by 周饰宇 on 2017/4/17.
//  Copyright © 2017年 zhouShiYu. All rights reserved.
//

import UIKit

class OAuthViewController: UIViewController {

    // 定义webview
    var webView : UIWebView?
    
    override func loadView() {
        
        
        webView = UIWebView()
        
        view = webView
        
        // 根视图就是webView
        title = "新浪微博"
        navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "关闭", style: UIBarButtonItemStyle.plain, target: self, action: #selector(OAuthViewController.close))
        navigationItem.rightBarButtonItem?.tintColor = UIColor.orange
       
    }
    
    // 关闭页面
    func close(){
        
        dismiss(animated: true, completion: nil)
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
